import request from '@/utils/request'

// 获取志愿队伍列表
export function getTeamList(params) {
  return request({
    url: '/teams',
    method: 'get',
    params
  })
}

// 获取志愿队伍详情
export function getTeamDetail(id) {
  return request({
    url: `/teams/${id}`,
    method: 'get'
  })
}

// 添加志愿队伍
export function addTeam(data) {
  return request({
    url: '/teams',
    method: 'post',
    data
  })
}

// 更新志愿队伍
export function updateTeam(id, data) {
  return request({
    url: `/teams/${id}`,
    method: 'put',
    data
  })
}

// 删除志愿队伍
export function deleteTeam(id) {
  return request({
    url: `/teams/${id}`,
    method: 'delete'
  })
}

// 审核通过队伍
export function approveTeam(id) {
  return request({
    url: `/teams/${id}/approve`,
    method: 'post'
  })
}

// 拒绝队伍
export function rejectTeam(id, reason) {
  return request({
    url: `/teams/${id}/reject`,
    method: 'post',
    data: { reason }
  })
}

// 获取队伍成员
export function getTeamMembers(id) {
  return request({
    url: `/teams/${id}/members`,
    method: 'get'
  })
}

// 获取队伍活动
export function getTeamActivities(id) {
  return request({
    url: `/teams/${id}/activities`,
    method: 'get'
  })
} 